using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;

namespace ERP.ERPSystem.ProductionSystem.Dto
{
    /// <summary>
    /// 客户订单数据传输对象
    /// </summary>
    public class CustomerOrderDto : EntityDto<int>
    {
        /// <summary>
        /// 产品编号
        /// </summary>
        [Required(ErrorMessage = "产品编号不能为空")]
        public string ProductCode { get; set; } = "";

        /// <summary>
        /// 产品名称
        /// </summary>
        [Required(ErrorMessage = "产品名称不能为空")]
        public string ProductName { get; set; } = "";

        /// <summary>
        /// 产品规格
        /// </summary>
        public string? ProductSpec { get; set; }

        /// <summary>
        /// 订单编码
        /// </summary>
        [Required(ErrorMessage = "订单编码不能为空")]
        public string OrderCode { get; set; } = "";

        /// <summary>
        /// 客户编码
        /// </summary>
        public string? CustomerCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        [Required(ErrorMessage = "客户名称不能为空")]
        public string CustomerName { get; set; } = "";

        /// <summary>
        /// 订货日期
        /// </summary>
        [Required(ErrorMessage = "订货日期不能为空")]
        public DateTime OrderDate { get; set; }

        /// <summary>
        /// 交货日期
        /// </summary>
        [Required(ErrorMessage = "交货日期不能为空")]
        public DateTime DeliveryDate { get; set; }

        /// <summary>
        /// 订货数量
        /// </summary>
        [Required(ErrorMessage = "订货数量不能为空")]
        [Range(1, int.MaxValue, ErrorMessage = "订货数量必须大于0")]
        public int OrderQuantity { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [Required(ErrorMessage = "单位不能为空")]
        public string Unit { get; set; } = "";

        /// <summary>
        /// 规格型号
        /// </summary>
        public string? SpecModel { get; set; }

        /// <summary>
        /// 质量要求
        /// </summary>
        public string? QualityRequirements { get; set; }

        /// <summary>
        /// 订单状态（0-待处理, 1-已确认, 2-生产中, 3-已完成, 4-已取消）
        /// </summary>
        public int OrderStatus { get; set; } = 0;
    }
} 